import { GetResultListData } from "@/network/result/model";
import { getResultList } from "@/network/result/service";
import { Component } from "react";
import { Props, State } from "./model";
export default class Service extends Component<Props,State>{
   
    state: Readonly<State>={
        resultData:{
            list:[],
            token:""
       },
       chooseId:4210
    };

    setResultList=async()=>{
        try {
            let data=await getResultList({});
            console.log(data)
            this.setState({
                resultData:data as GetResultListData
            },()=>{console.log(this.state.resultData)})
            
        } catch (error) {
            console.log(error)
        }
    }
    constructor(props:Props){
        super(props)
    }
    componentWillMount =async ()=>{
        await this.setResultList();
        
    }
   
}